import time
from selenium import webdriver
from selenium.webdriver.common.by import By

#   六月  酒仙网业务流程脚本编写 二
driver=webdriver.Edge()
driver.maximize_window()
driver.get('https://www.jiuxian.com/')
time.sleep(3)
# 请登录
driver.find_element(By.CLASS_NAME,'headerLogin').click()
time.sleep(3)

# 手机号
driver.find_element(By.NAME,'uname').send_keys("13103053968")
time.sleep(3)
# 密码
driver.find_element(By.NAME,'_pwd').send_keys("jiuxianwang123aaa")
time.sleep(10)
# 登录按钮
driver.find_element(By.ID,'save').click()
time.sleep(3)
# 点击首页商品
driver.find_element(By.XPATH,'//*[@id="crazySale"]/div[1]/div[2]/div[2]/ul/li[1]/div[1]/a/img').click()
time.sleep(3)
# 接入购物车
driver.find_element(By.XPATH,'//*[@id="addToCartForDetail"]').click()
time.sleep(3)